package com.sudo.dao.admin.mapper;

import com.sudo.common.mapper.MyMapper;
import com.sudo.dao.admin.entity.SysUser;
import com.sudo.dao.admin.model.bo.SysUserQueryBO;
import com.sudo.dao.admin.model.vo.SysSimpleUserVO;
import com.sudo.dao.admin.model.vo.SysUserMainVO;
import com.sudo.dao.admin.model.vo.SysUserOnlineVO;
import com.sudo.dao.admin.model.vo.SysUserReVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 为道日损
 * webSite https://www.sudo.ren
 */
public interface SysUserMapperCustom extends MyMapper<SysUser> {
    /**
     * 通过用户名查询用户信息和对应的角色
     * @param username username
     * @return sysUserReVo
     */
    SysUserReVO getSysUserAndRoleByUsername(@Param("username") String username);

    /**
     * 查询所有用户的主要信息
     *
     * @return list
     */
    List<SysUserMainVO> getAllSysUserMainInfo(@Param("sysUserQueryBO") SysUserQueryBO sysUserQueryBO);

    SysSimpleUserVO getMySimpleUserInfo(@Param("username") String username);

    List<SysUserOnlineVO> getOnlineUser(@Param("list") List<String> usernameList);
}
